package org.marketlive.entity.attributes;

/*
(C) Copyright MarketLive. 2006. All rights reserved.
MarketLive is a trademark of MarketLive, Inc.
Warning: This computer program is protected by copyright law and international treaties.
Unauthorized reproduction or distribution of this program, or any portion of it, may result
in severe civil and criminal penalties, and will be prosecuted to the maximum extent
possible under the law.
*/

import java.util.List;
import java.io.Serializable;

/**
 * Represents an attribute type.
 */
public interface IAttributeType extends Serializable {

    /**
     * Returns the level of this attribute type, usually Product, Sku, or Category.
     * @return the level of this type
     */
    String getLevel();

    /**
     * Sets the level of this attribute type, usually Product, Sku or Category.
     * @param level the level of this type
     */
    void setLevel(String level);

    /**
     * Returns the type of this attribute type.
     * @return the type of this attribute type
     */
    String getType();

    /**
     * Sets the type of this attribute type.
     * @param type the type of this attribute type
     */
    void setType(String type);

    /**
     * Returns the list items of this attribute type.
     * @return the list items
     */
    List getListItems();

    /**
     * Sets the list items of this attribute type.
     * @param listItems the list items of this attribute type
     */
    void setListItems(List listItems);

    /**
     * Returns 0 if this type is not in use, or greater than 0 if it is in use.
     *
     * @return 0 if this type is not in use, or greater than 0 if it is in use
     */
    int getInUse();

    /**
     * Sets the integer for if this type is in use.
     * Use 0 to indicate this type is not in use. Use a positive integer,
     * such as the number of times the type is used, to indicate that it is in use.
     *
     * @param inUse the integer for if this type is in use
     */
    void setInUse(int inUse);

    /**
     * Returns "Yes" if this type is in use, and "No" otherwise.
     *
     * @return "Yes" if this type is in use, "No" otherwise
     */
    String getInUseString();

    /**
     * Returns the category this type is in.
     * @return the category this type is in
     */
    String getCategory();

    /**
     * Sets the category of this type.
     * @param category the category of this type
     */
    void setCategory(String category);

    /**
     * Returns the ID of the category of this type.
     * @return the ID of the category of this type
     */
    public Integer getCategoryID();

    /**
     * Sets the ID of the category of this type.
     * @param categoryID the ID of the category of this type
     */
    public void setCategoryID(Integer categoryID);

    /**
     * Evaluates.
     * @param objectIn the objectIn parameter
     * @return true or false
     */
    boolean evaluate(Object objectIn);

    // ------------------------------------------------------------------------------------------------------------------------------------
    /*
        Methods from IDataObject

        TODO
            1) 'delete'( make sure that there are no usages implementaion are OK) the methods that Attribute does not need
            make sure that the class fields are not used in any tags for display.
    */

    /**
     * Returns the id of this type.
     * @return the id of this type
     */
    public Integer getID();

    /**
     * Returns the name of this type.
     * @return the name of this type
     */
    public String getName();

    /**
     * Returns the description.
     * @return the description
     */
    public String getDescription();

    /**
     * Returns the date created.
     * @return the date created
     */
    public long getDateCreate();

    /**
     * Returns the date activated.
     * @return the date activated
     */
    public long getDateActivate();

    /**
     * Returns the date deactivated.
     * @return the date deactivated
     */
    public long getDateDeactivate();

    /**
     * Returns the date deleted.
     * @return the date deleted
     */
    public long getDateDeleted();

    /**
     * Returns the date modified.
     * @return the date modified
     */
    public long getDateModified();

    /**
     * Returns the delete flag.
     * @return the delete flag
     */
    public boolean isDeleteFlag();

    /**
     * Returns the status.
     * @return the status
     */
    public int getStatus();

    /**
     * Sets the ID.
     * @param id the ID
     */
    public void setID(Integer id);

    /**
     * Sets the name.
     * @param name the name
     */
    public void setName(String name);

    /**
     * Sets the description.
     * @param name the description
     */
    public void setDescription(String name);

    /**
     * Sets the status.
     * @param status the status
     */
    public void setStatus(int status);

    /**
     * Sets the create date.
     * @param dateCreate  the create date
     */
    public void setDateCreate(long dateCreate);

    /**
     * Sets the activate date.
     * @param dateActivate the activate date
     */
    public void setDateActivate(long dateActivate);

    /**
     * Sets the deactivate date.
     * @param dateDeactivate the deactivate date
     */
    public void setDateDeactivate(long dateDeactivate);

    /**
     * Sets the date deleted.
     * @param dateDeleted the date deleted
     */
    public void setDateDeleted(long dateDeleted);

    /**
     * Sets the date modified.
     * @param dateModified the date modified
     */
    public void setDateModified(long dateModified);

    /**
     * Sets the delete flag.
     * @param deleteFlag the delete flag
     */
    public void setDeleteFlag(boolean deleteFlag);

    /**
     * Gets the ordinal.
     * @return the ordinal
     */
    public int getOrdinal();

    /**
     * Sets the ordinal for this attribute type.
     * @param ordinal the ordinal of this attribute type
     */
    public void setOrdinal(int ordinal);

    /**
     * Returns a comma-delimited string containing the ListItem values.
     *
     * @return the list items string
     */
    String getListItemsString();

    /**
     * Returns a comma-delimited string containing the ListItem IDs.
     *
     * @return String described above.
     */
    String getListItemValuesString();

    /**
     *  Createa a new list from listItems.
     *
     * @param listItems the list items to take
     * @return the list items to return
     */
    List getListItemsFromValues(String listItems);

    // ---------------------------------------End copied methods from IDataObject -------------------------------------------------------------
}
